Skip to content

feat: use uv lock file - #1427

Merged
SMoraisAnsys merged 35 commits into
mainfrom
feat/use-uv-lock-file
Aug 7, 2026
Merged

feat: use uv lock file#1427
SMoraisAnsys merged 35 commits into
mainfrom
feat/use-uv-lock-file

Conversation

@SMoraisAnsys

@SMoraisAnsys SMoraisAnsys commented Jul 25, 2026

Copy link
Copy Markdown
Contributor

Follow up of #1364 but with a clean branch.

Related to #1088, in particular this comment, and #1088.

The use of uv add --group ansys-actions -r "${REQUIREMENTS_FILE}" has been removed in 10ddec7 because some hooks might check the pyproject.toml / uv.lock files and lead to CI failure. That is the case with pyansys-geometry which leverages pyproject-fmt.

The smoke_test.py file has been updated in 6932c1a to be compatible with uv's architecture to manage packages. I assume that we we weren't affected previously because uv pip install mimics pip's behavior. But when using uv sync that behavior changes and we can't use CWD to retrieve the dist files. Levering relative location solves this issue and seems to also work with other package managers.

Note

To align the lockfile logic to the artificial project ansys-actions-ci-dependencies, the doc dependency group has been added and the minimum version has been bumped. This aligns with our will to follow SPEC 0 and ensure that we keep using the same dependencies has the one that where defined in requirements/requirements_doc.txt which has been removed ! Each action has it's requirements.txt file regenerated and docutils has been pinned back to 0.22.4 instead of 0.23 (automatic generation).

Warning

On top of the breaking change associated to the use of dependencies, the project has been upgraded to python3.12+ compatibility. This means that from this point we might define (if not yet with this PR) dependencies that are not compatible for downstream workflows. I'm fine with it but we have to make it clear to users. Pinging @moe-ad for visibility.

@SMoraisAnsys
SMoraisAnsys requested a review from a team as a code owner July 25, 2026 06:56
@github-actions github-actions Bot added the enhancement General improvements to existing features label Jul 25, 2026
@SMoraisAnsys
SMoraisAnsys marked this pull request as draft July 25, 2026 16:41
@github-actions github-actions Bot added the ci Pipelines maintenance related label Jul 25, 2026
@SMoraisAnsys
SMoraisAnsys force-pushed the feat/use-uv-lock-file branch from 17f742f to 6932c1a Compare July 28, 2026 16:16
Comment thread .github/workflows/ci_cd_pr.yml Outdated
@SMoraisAnsys SMoraisAnsys self-assigned this Jul 29, 2026
@SMoraisAnsys
SMoraisAnsys marked this pull request as ready for review July 29, 2026 07:36

@moe-ad moe-ad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes @SMoraisAnsys, I left a couple of comments.

There is one other thing I have been thinking about, why can't we just use the uv lock files automatically once detected rather than exposing an explicit input for it (similar to how there is no input for poetry). IMO, a project that already uses a lock file would expect its dependencies to be installed from it.

Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread build-library/action.yml Outdated
Comment thread build-wheelhouse/action.yml
Comment thread build-wheelhouse/smoke_test.py
Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread check-vulnerabilities/action.yml Outdated
Comment thread check-vulnerabilities/action.yml Outdated
@SMoraisAnsys

Copy link
Copy Markdown
Contributor Author

Thanks for the changes @SMoraisAnsys, I left a couple of comments.

There is one other thing I have been thinking about, why can't we just use the uv lock files automatically once detected rather than exposing an explicit input for it (similar to how there is no input for poetry). IMO, a project that already uses a lock file would expect its dependencies to be install from it.

I'm fine with detecting it and activating it by default. My only concern is the sudden change of behavior for people that still work with version tag and/or don't read every release note carefully.

@moe-ad

moe-ad commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Thanks for the changes @SMoraisAnsys, I left a couple of comments.
There is one other thing I have been thinking about, why can't we just use the uv lock files automatically once detected rather than exposing an explicit input for it (similar to how there is no input for poetry). IMO, a project that already uses a lock file would expect its dependencies to be install from it.

I'm fine with detecting it and activating it by default. My only concern is the sudden change of behavior for people that still work with version tag and/or don't read every release note carefully.

I could wait for this to get merged before v11 release, that way we have a graceful way of introducing this change. We can clearly document behavior change in the migration guide and those using tags won't be affected until they explicitly bump. What do you think?

Comment thread check-vulnerabilities/action.yml Outdated
Comment thread check-vulnerabilities/action.yml Outdated
Comment thread .github/workflows/ci_cd_pr_flit.yml Outdated
Comment thread check-vulnerabilities/action.yml Outdated
Comment thread doc/source/changelog/1427.added.md

@moe-ad moe-ad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think out of all the actions this has been extended to, _doc-build-windows, check-vulnerabilities and tests-pytest are the only ones not being tested directly in the actions pipelines. It will be nice if we can test those prior to merging, just to be certain things run fine.

Thanks for the major changes @SMoraisAnsys!

Comment thread build-library/action.yml Outdated
@SMoraisAnsys

SMoraisAnsys commented Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

I think out of all the actions this has been extended to, _doc-build-windows, check-vulnerabilities and tests-pytest are the only ones not being tested directly in the actions pipelines. It will be nice if we can test those prior to merging, just to be certain things run fine.

Thanks for the major changes @SMoraisAnsys!

I was working on adding those tests in the other PR. If the changes aren't pushed, I'll update that (miss on my side) (it was pushed).

@SMoraisAnsys
SMoraisAnsys marked this pull request as draft August 3, 2026 12:52
@SMoraisAnsys

Copy link
Copy Markdown
Contributor Author

Converted to draft until testing is fully performed (still some misses)

@SMoraisAnsys
SMoraisAnsys force-pushed the feat/use-uv-lock-file branch from 51aa241 to 141acfa Compare August 3, 2026 12:53
SMoraisAnsys and others added 25 commits August 7, 2026 08:53
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Muhammed Adedigba <68085496+moe-ad@users.noreply.github.com>
Co-authored-by: Revathy Venugopal <104772255+Revathyvenugopal162@users.noreply.github.com>
@moe-ad
moe-ad force-pushed the feat/use-uv-lock-file branch from e207614 to 8bb98f6 Compare August 7, 2026 07:53
@SMoraisAnsys
SMoraisAnsys merged commit bd24da0 into main Aug 7, 2026
74 checks passed
@SMoraisAnsys
SMoraisAnsys deleted the feat/use-uv-lock-file branch August 7, 2026 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci Pipelines maintenance related enhancement General improvements to existing features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants